#include "UIControl.h"

UIControl::UIControl(UIControl* p_pParent) : m_pParent(p_pParent)
{
	m_v3Location.x = 0;
	m_v3Location.y = 0;
	m_v3Location.z = 0;
}

UIControl::~UIControl()
{
}

void UIControl::onFocus()
{
	m_hasFocus = true;
}

void UIControl::onLostFocus()
{
	m_hasFocus = false;
}

UIControl* UIControl::getParent()
{
	return m_pParent;
}

LPSTR UIControl::getType()
{
	return TEXT("UIControl");
}

void* UIControl::getUserData()
{
	return m_pUserData;
}

void UIControl::setUserData(void* p_pUserData)
{
	m_pUserData = p_pUserData;
}

bool UIControl::isEnable()
{
	return m_isEnable;
}

bool UIControl::isVisible()
{
	return m_isVisible;
}

bool UIControl::isFocus()
{
	return m_hasFocus;
}

void UIControl::setParent(UIControl* p_pParent)
{
	m_pParent = p_pParent;
}

void UIControl::setPosition(int p_iX, int p_iY)
{
	m_v3Location.x = p_iX;
	m_v3Location.y = p_iY;
}